<?php use_stylesheets_for_form($form) ?>
<?php use_javascripts_for_form($form) ?>

<form action="<?php echo url_for('network/'.($form->getObject()->isNew() ? 'create' : 'update').(!$form->getObject()->isNew() ? '?id='.$form->getObject()->getId() : '')) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
<?php if (!$form->getObject()->isNew()): ?>
<input type="hidden" name="sf_method" value="put" />
<?php endif; ?>
  <table>
    <tfoot>
      <tr>
        <td colspan="2">
          <?php echo $form->renderHiddenFields(false) ?>
          &nbsp;<a href="<?php echo url_for('network/index') ?>">Back to list</a>
          <?php if (!$form->getObject()->isNew()): ?>
            &nbsp;<?php echo link_to('Delete', 'network/delete?id='.$form->getObject()->getId(), array('method' => 'delete', 'confirm' => 'Are you sure?')) ?>
          <?php endif; ?>
          <input type="submit" value="Save" />
        </td>
      </tr>
    </tfoot>
    <tbody>
      <?php echo $form->renderGlobalErrors() ?>
      <tr>
        <th><?php echo $form['name']->renderLabel() ?></th>
        <td>
          <?php echo $form['name']->renderError() ?>
          <?php echo $form['name'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['type']->renderLabel() ?></th>
        <td>
          <?php echo $form['type']->renderError() ?>
          <?php echo $form['type'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['plant']->renderLabel() ?></th>
        <td>
          <?php echo $form['plant']->renderError() ?>
          <?php echo $form['plant'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['system']->renderLabel() ?></th>
        <td>
          <?php echo $form['system']->renderError() ?>
          <?php echo $form['system'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['network']->renderLabel() ?></th>
        <td>
          <?php echo $form['network']->renderError() ?>
          <?php echo $form['network'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['ip1']->renderLabel() ?></th>
        <td>
          <?php echo $form['ip1']->renderError() ?>
          <?php echo $form['ip1'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['url']->renderLabel() ?></th>
        <td>
          <?php echo $form['url']->renderError() ?>
          <?php echo $form['url'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['user1']->renderLabel() ?></th>
        <td>
          <?php echo $form['user1']->renderError() ?>
          <?php echo $form['user1'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['pass1']->renderLabel() ?></th>
        <td>
          <?php echo $form['pass1']->renderError() ?>
          <?php echo $form['pass1'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['pingable']->renderLabel() ?></th>
        <td>
          <?php echo $form['pingable']->renderError() ?>
          <?php echo $form['pingable'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['ip2']->renderLabel() ?></th>
        <td>
          <?php echo $form['ip2']->renderError() ?>
          <?php echo $form['ip2'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['ip3']->renderLabel() ?></th>
        <td>
          <?php echo $form['ip3']->renderError() ?>
          <?php echo $form['ip3'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['subnet']->renderLabel() ?></th>
        <td>
          <?php echo $form['subnet']->renderError() ?>
          <?php echo $form['subnet'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['gateway']->renderLabel() ?></th>
        <td>
          <?php echo $form['gateway']->renderError() ?>
          <?php echo $form['gateway'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['user2']->renderLabel() ?></th>
        <td>
          <?php echo $form['user2']->renderError() ?>
          <?php echo $form['user2'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['pass2']->renderLabel() ?></th>
        <td>
          <?php echo $form['pass2']->renderError() ?>
          <?php echo $form['pass2'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['note']->renderLabel() ?></th>
        <td>
          <?php echo $form['note']->renderError() ?>
          <?php echo $form['note'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['subplant']->renderLabel() ?></th>
        <td>
          <?php echo $form['subplant']->renderError() ?>
          <?php echo $form['subplant'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['manufacturer']->renderLabel() ?></th>
        <td>
          <?php echo $form['manufacturer']->renderError() ?>
          <?php echo $form['manufacturer'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['model']->renderLabel() ?></th>
        <td>
          <?php echo $form['model']->renderError() ?>
          <?php echo $form['model'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['protocols']->renderLabel() ?></th>
        <td>
          <?php echo $form['protocols']->renderError() ?>
          <?php echo $form['protocols'] ?>
        </td>
      </tr>
    </tbody>
  </table>
</form>
